package cn.edu.cug.cs.gtl.apis.render.projectors;

import cn.edu.cug.cs.gtl.apis.render.basics.Line;
import cn.edu.cug.cs.gtl.apis.render.basics.Vec2f;
import cn.edu.cug.cs.gtl.apis.render.basics.Vec3f;

public interface LineProjector extends Projector{
    /**
     * Gets the line on which to project 2D points.
     * @return
     */
    Line getLine();

    /**
     * Gets a vector given the current mouse point.
     * @param mousePosition
     * @return
     */
    Vec3f getVector(Vec2f mousePosition);

    /**
     *
     Gets a vector on this line given two normalized mouse points.
     * @param mousePosition1
     * @param mousePosition2
     * @return
     */
    Vec3f	getVector(Vec2f mousePosition1, Vec2f mousePosition2);

    /**
     *
     * Applies the projector using the given point, returning the point in three dimensions that it projects to and the status.
     * @param point
     * @return
     */
    Vec3f	project(Vec2f point);

    /**
     * Sets the line on which to project 2D points.
     * @param line
     */
    void	setLine(Line line);


    /**
     * Sets the initial position from a mouse position.
     * @param mousePosition
     */
    void	setStartPosition(Vec2f mousePosition);

    /**
     * Sets the initial position from a point on the projector.
     * @param point
     */
    void	setStartPosition(Vec3f point);

}
